<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ptv_backend_CI</title>
<link rel="stylesheet" type="text/css" href="<?php echo base_url();?>public/admin/css/style.css" />
<script type="text/javascript" src="<?php echo base_url();?>public/admin/js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="<?php echo base_url();?>public/admin/js/ddaccordion.js"></script>
<script type="text/javascript">
ddaccordion.init({
	headerclass: "submenuheader", //Shared CSS class name of headers group
	contentclass: "submenu", //Shared CSS class name of contents group
	revealtype: "click", //Reveal content when user clicks or onmouseover the header? Valid value: "click", "clickgo", or "mouseover"
	mouseoverdelay: 200, //if revealtype="mouseover", set delay in milliseconds before header expands onMouseover
	collapseprev: true, //Collapse previous content (so only one open at any time)? true/false 
	defaultexpanded: [], //index of content(s) open by default [index1, index2, etc] [] denotes no content
	onemustopen: false, //Specify whether at least one header should be open always (so never all headers closed)
	animatedefault: false, //Should contents open by default be animated into view?
	persiststate: true, //persist state of opened contents within browser session?
	toggleclass: ["", ""], //Two CSS classes to be applied to the header when it's collapsed and expanded, respectively ["class1", "class2"]
	animatespeed: "fast", //speed of animation: integer in milliseconds (ie: 200), or keywords "fast", "normal", or "slow"
	oninit:function(headers, expandedindices){ //custom code to run when headers have initalized
		//do nothing
	},
	onopenclose:function(header, index, state, isuseractivated){ //custom code to run whenever a header is opened or closed
		//do nothing
	}
})
</script>

</head>
<body>
<div id="main_container">

	<div class="header"></div>
    
    <div class="main_content">
		<div class="menu">
			<ul>
				<li><a class="current" href="<?php echo base_url(); ?>admin">Trang Chủ</a></li>
			</ul>
		</div> 
       
    <div class="center_content">  
    <div class="left_content">
            <div class="sidebarmenu">
                <a class="menuitem" href="<?php echo base_url(); ?>admin/add_product">Thêm Sản Phẩm</a>
                <a class="menuitem" href="<?php echo base_url(); ?>admin/update_select">Update Thông Tin Sản Phẩm</a>      
                <a class="menuitem_red" href="<?php echo base_url(); ?>admin/delete_select">Xóa Sản Phẩm</a>
                 
            </div>    
    </div>
    
    
    <div class="right_content">            
        <h2>UPDATE THÔNG TIN SẢN PHẨM</h2> 
        <?php 
            $attributes = array('id' => 'edit_product');
            echo form_open_multipart('admin/update_product',$attributes);
        ?>
            <table>
                <tr>
                    <td>ID sản phẩm : </td>
                    <td><input type="text" name="product_id" id="product_id" value="<?php echo $id; ?>" /></td>
                </tr>
                <tr>
                    <td>ID loại sản phẩm : </td>
                    <td>
                        <input type="text" name="product_type" id="product_type" disabled="true" value="<?php echo $options; ?>" />
                    </td>
                </tr>
                <tr>
                    <td>Tên sản phẩm : </td>
                    <td><input type="text" name="product_name" id="product_name" value="<?php echo $name; ?>" /></td>
                </tr>
                <tr>
                    <td>Giá sản phẩm : </td>
                    <td><input type="text" name="product_price" id="product_price" value="<?php echo $price; ?>" /></td>
                </tr>
                
                <tr>
                    <td>Thông số sản phẩm </td>
                </tr>
                <tr>
                   <td>CPU : </td>
                    <td><input type="text" name="product_cpu" id="product_cpu" value="<?php echo $cpu; ?>"/></td>
                </tr>
                <tr>
                    <td>RAM : </td>
                    <td><input type="text" name="product_ram" id="product_ram" value="<?php echo $ram; ?>"/></td>
                </tr>
                <tr>
                    <td>HDD : </td>
                    <td><input type="text" name="product_hdd" id="product_hdd" value="<?php echo $hdd; ?>"/></td>
                </tr>
                <tr>
                    <td>VGA : </td>
                    <td><input type="text" name="product_vga" id="product_vga" value="<?php echo $vga; ?>"/></td>
                </tr>
                <tr>
                    <td>LCD : </td>
                    <td><input type="text" name="product_lcd" id="product_lcd" value="<?php echo $lcd; ?>"/></td>
                </tr>
                <tr>
                    <td>Lan : </td>
                    <td><input type="text" name="product_lan" id="product_lan" value="<?php echo $lan; ?>"/></td>
                </tr>
                <tr>
                    <td>Weight : </td>
                    <td><input type="text" name="product_weight" id="product_weight" value="<?php echo $weight; ?>"/></td>
                </tr>
                <tr>
                    <td>Pin : </td>
                    <td><input type="text" name="product_pin" id="product_pin" value="<?php echo $pin; ?>"/></td>
                </tr>
                <tr>
                    <td>OS : </td>
                    <td><input type="text" name="product_os" id="product_os" value="<?php echo $os; ?>"/></td>
                </tr>
                <tr>
                    <td>Optical : </td>
                    <td><input type="text" name="product_optical" id="product_optical" value="<?php echo $optical; ?>"/></td>
                </tr>
                <tr>
                    <td>Bảo Hành : </td>
                    <td><input type="text" name="product_baohanh" id="product_baohanh" value="<?php echo $baohanh; ?>"/></td>
                </tr>
                
                <tr>
                    <td>Thông số hình ảnh </td>
                </tr>
                <tr>
                <td></td>
                    <td>
                    <?php
                         foreach($img_path as $path)
                         {
                            echo "<img src='../.".$path->DuongDan."' alt='CHƯA CÓ HÌNH ẢNH' width='150' height='150' />";
                         }
                    ?>
                    </td>
                </tr>
                <tr>
                    <td>Ðường dẫn : </td>
                    <td><input type="file" name="product_img_path" id="product_img_path"/></td>
                </tr>    
                <tr>
                    <td>Mô tả : </td>
                    <td><input type="" name="product_description" id="product_description" value="<?php echo $description; ?>"/></td>
                </tr>
                <tr>
                    <td><input type="submit" value="edit" /></td>
                </tr>
            </table>
            </form>
    </div>          

    <div class="clear"></div>
    
    </div> <!--end of main content-->

    <div class="footer">
    </div>
</div>		
</body>
</html>